package net.atomtree.corrsepond.template;

import net.atomtree.corrsepond.mode.JobMode;
import net.atomtree.corrsepond.execotor.JobExecutor;

import java.util.Map;

/**
 * Created by czk on 2016/1/2.
 */
public class JobURLTemplate implements URLTemplate {
    @Override
    public String analyse(Map<String, String> URLParam) throws Exception {
        int linkMode=new JobMode().AnalyseMode(URLParam);
        if(linkMode==JobMode.jobMode)
            return JobExecutor.jobModeExecutor(URLParam);
        return JobExecutor.linkByJobIdModeExecutor(URLParam);
    }


}
